Alternative firmware with nRST support for STM32
sudo dnf install dfu-util
You need a second ST-Link for flashing the other one. Open up the case an connect the swd pins.
git clone https://github.com/devanlai/dapboot
cd src
make TARGET=STLINK
openocd -f /usr/share/openocd/scripts/interface/stlink.cfg -f /usr/share/openocd/scripts/target/stm32f1x.cfg -c 'init' -c 'reset halt' -c
'stm32f1x unlock 0' -c 'reset halt' -c ' program dapboot.elf verify reset exit'
git clone https://github.com/devanlai/dapboot
cd src
make TARGET=STM32F103-DFUBOOT
make TARGET=STM32F103-DFUBOOT dfu-flash